import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;

public class FileDemo16 {
    public static void main(String[] args) throws IOException {
        try(OutputStream outputStream = new FileOutputStream("test.txt")){
            try(PrintWriter writer = new PrintWriter(outputStream)){
                writer.println("hello 你好");
            }
        }
    }
}
